package cn.xspace.library.util;

/**
 * Created by liuchen on 2017/1/10.
 */
public enum ContentType {
    PICTURE(0, "[图片]"),
    VOICE(1, "[语音]"),
    VEDIO(2, "[视频]"),
    TXT(3, "[文本]"),
    OTHER(4, "[链接]"),
    FILE(5, "[文件]"),
    SYSTEM_WARN(6, "[系统消息]"),
    LOCATION(7, "[位置]");
    private int INum = 0;
    private String IStr = "";

    /* 构造器，记住喇，必须是私有的~ */
    private ContentType(int iNum, String showTxt) {
        this.INum = iNum;
        this.IStr = showTxt;
    }

    /* 用这个方法代替ordinal()方法，安全，专业，包退包换~ */
    public int toNumber() {
        return this.INum;
    }

    public String getTxt() {
        return this.IStr;
    }
}
